import request from "@/utils/request";
import { EventExhibitionBannerQuery, EventExhibitionBannerPageResult, EventExhibitionBannerForm, EventExhibitionBanner } from "./model";

/**
 * 大图分类API
 */
class EventExhibitionBannerAPI {

  /**
   * 大图分类分页数据
   * @param queryParams 
   * @returns 
   */
  static getPage(queryParams?: EventExhibitionBannerQuery) {
    return request<any, EventExhibitionBannerPageResult>({
      url:
        "/eventExhibitionBanner/getPage?currentPage=" +
        queryParams?.pageNum +
        "&size=" +
        queryParams?.pageSize,
      method: "post",
      data: queryParams,
    });
  }

  /**
   * 获取大图分类列表
   * @param data 
   * @returns 
   */
  static getList(data: EventExhibitionBannerQuery) {
    return request<any, EventExhibitionBanner[]>({
      url: "/eventExhibitionBanner/getList",
      method: "post",
      data: data,
    });
  }


  /**
   * 新增大图分类
   * @param data 
   * @returns 
   */
  static add(data: EventExhibitionBannerForm) {
    return request({
      url: "/eventExhibitionBanner/add",
      method: "post",
      data: data,
    });
  }
  /**
   * 修改大图分类
   * @param data 
   * @returns 
   */
  static update(data: EventExhibitionBannerForm) {
    return request({
      url: "/eventExhibitionBanner/edit",
      method: "post",
      data: data,
    });
  }

  /**
   * 删除大图分类
   * @param data 
   * @returns 
   */
  static delete(data: EventExhibitionBannerForm) {
    return request({
      url: "/eventExhibitionBanner/delete",
      method: "post",
      data: data,
    });
  }
}

export default EventExhibitionBannerAPI;
